#include<iostream>
using namespace std;


char* deletespace(char* a) {
	int i = 0;
	while (a[i] == ' ') {
		i++;
	}
	int n = i;
	while (a[n] != '\0') {
		n++;
	}
	int j = n - 2;
	while (a[j] == ' ') {
		j--;
	}
	char* ans = new char[100];
	int k = 0;
	for (k = 0; k < j - i + 1; k++) {
		ans[k] = a[k + i];
	}
	ans[k] = '#';
	ans[k + 1] = '\0';
	return ans;
}


int main(){
	char* res = new char[100];
	cin.getline(res, 100);
	cout << deletespace(res);
	return 0;
}
